const mongoose = require('mongoose');
const {
    Schema
} = mongoose;

const Joi = require('joi');

const RoleSchema = new Schema({
    rid: {
        type: Number,
        required: true,
        unique: true,
        min: 0,
        max: 15
    },
    title: {
        type: String,
        minlength: 2,
        maxlength: 12,
        required: true,
        unique: true
    },
    status: {
        type: Boolean,
        required: false
    }
}, {
    versionKey: false
});

const Role = mongoose.model('Role', RoleSchema);

module.exports = {
    Role
}